import fetch from 'common/src/utils/fetch'

export function findList(data) {
  return fetch({
    url:
      '/api/majorservice/interFeaturedExam/list',
    method: 'post',
    headers: {'Content-Type': 'application/json'},
    data
  });
}
// 查询时间权限
export function findTransSubjectPrivilege(data) {
  return fetch({
    url:
      '/api/majorservice/transSubjectPrivilege/selectTransSubjectPrivilegePage',
    method: 'post',
    headers: { 'Content-Type': 'application/json' },
    data
  });
}

//新增
export function addData(data) {
  return fetch({
    url: '/api/majorservice/interFeaturedExam/add',
    method: 'post',
    headers: {'Content-Type': 'application/json'},
    data
  });
}

export function editData(data) {
  return fetch({
    url: '/api/majorservice/interFeaturedExam/edit',
    method: 'put',
    headers: {'Content-Type': 'application/json'},
    data
  });
}


export function deleteData(id, grade) {
  return fetch({
    url:
      `/api/majorservice/interFeaturedExam/delete?id=${id}&grade=${grade}`,
    method: 'delete',
    headers: {'Content-Type': 'application/json'}
  });
}

export function detailData(id) {
  return fetch({
    url:
      `/api/majorservice/interFeaturedExam/detail?id=${id}`,
    method: 'post',
    headers: {'Content-Type': 'application/json'}
  });
}

export function checkExam(data) {
  return fetch({
    url:
      `/api/majorservice/interFeaturedExam/checkExam`,
    method: 'post',
    headers: {'Content-Type': 'application/json'},
    data
  });
}

export function generateStudentList(data) {
  return fetch({
    url:
      `/api/majorservice/interFeaturedExam/generateStudentList`,
    method: 'post',
    headers: {'Content-Type': 'application/json'},
    data
  });
}

export function exportData(data) {
  return fetch({
    url: `/api/majorservice/interInterview/exportList`,
    method: 'post',
    data: data,
    showMask: false
  });
}

export function getInterview() {
  return fetch({
    url: `/api/majorservice/interFeaturedExam/getFeatureByStudentId`,
    method: 'post'
  });
}

export function exportFeature(data) {
  return fetch({
    url: `/api/majorservice/interFeaturedExam/export`,
    method: 'post',
    data: data,
    showMask: false
  });
}

export function batchData(data) {
  return fetch({
    url: '/api/majorservice/interFeaturedExam/batch',
    method: 'post',
    headers: {'Content-Type': 'application/json'},
    data
  });
}
